package com.fuxian.dao;

import java.util.List;
import java.util.Map;

import com.fuxian.model.User;

public interface UserDao {

	/**
	 * ADD NEW USER
	 * @author fuxian
	 * @param user
	 */
	public int addUser(User user);

	/**
	 * DELETE USER BY ID
	 * @author fuxian
	 * @param id
	 */
	public int deleteUserById(int id);

	/**
	 * MODIFY USER
	 * @author fuxian
	 * @param user
	 */
	public int modifyUser(User user);

	/**
	 * SELECT USER BY ID
	 * @author fuxian
	 * @param id
	 * @return User
	 */
	public User selectUserById(int id);

	/**
	 * SELECT USERS BY status
	 * @author fuxian
	 * @param status
	 * @return List
	 */
	public List<User> selectUsersByStatus(Map map);

	/**
	 * SELECT USERS BY utype
	 * @author fuxian
	 * @param uType
	 * @return List
	 */
	public List<User> selectUsersByUtype(Map map);

	/**
	 * SELECT USER BY user_name
	 * @author fuxian
	 * @param userName
	 * @return User
	 */
	public User selectUserByUserName(String userName);

	/**
	 * SELECT USER BY user_name && PWD
	 * @author fuxian
	 * @param userName
	 * @param pwd
	 * @return User
	 */
	public User selectUserByUserNamePwd(User user);
	
	/**
	 * SELECT ALL USERS
	 * @return List
	 */
	public List<User> selectAllUsers(Map map);
	
	
	public int selectCount();
}
